import axios from '@/util'; 

import type {
  AppVersion,
} from './typings';



/**
 * 获取最新版本信息 GET /api/banBen/app-version
 */
export async function get_api_banben_app_version (
  options?: Record<string, any>,
): Promise<AppVersion> {
  return axios({
    method: 'GET',
    url: `/api/banBen/app-version`,
    ...(options || {}),
  })
}

/**
 * 获取所有版本信息 GET /api/banBen/versions
 */
export async function get_api_banben_versions (
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'GET',
    url: `/api/banBen/versions`,
    ...(options || {}),
  })
}

/**
 * 创建新版本 POST /api/banBen/version
 */
export async function post_api_banben_version (
  data: {
    /** 版本号 */
    version?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'POST',
    url: `/api/banBen/version`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 更新版本信息 PUT /api/banBen/version/{id}
 */
export async function put_api_banben_version__id_ (
  pathVars: {
    /**  */
    id: any;
  },
  data: {
    /** 版本号 */
    version?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/banBen/version/${pathVars.id}`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 删除版本 DELETE /api/banBen/version/{id}
 */
export async function delete_api_banben_version__id_ (
  pathVars: {
    /**  */
    id: any;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'DELETE',
    url: `/api/banBen/version/${pathVars.id}`,
    ...(options || {}),
  })
}
